package br.com.gerenciadoc.modelo;
// Generated 06/02/2012 15:58:47 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Documento generated by hbm2java
 */
@Entity
@Table(name="DOCUMENTO"
    ,catalog="gerenciadoc"
)
public class Documento  implements java.io.Serializable {


     private Integer id;
     private Usuario usuario;
     private String urlArquivo;
     private Date dataInsercao;

    public Documento() {
    }

    public Documento(Usuario usuario, String urlArquivo, Date dataInsercao) {
       this.usuario = usuario;
       this.urlArquivo = urlArquivo;
       this.dataInsercao = dataInsercao;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_autor", nullable=false)
    public Usuario getUsuario() {
        return this.usuario;
    }
    
    public void setUsuario(Usuario usuario) {
        this.usuario = usuario;
    }
    
    @Column(name="url_arquivo", nullable=false, length=1024)
    public String getUrlArquivo() {
        return this.urlArquivo;
    }
    
    public void setUrlArquivo(String urlArquivo) {
        this.urlArquivo = urlArquivo;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="data_insercao", nullable=false, length=10)
    public Date getDataInsercao() {
        return this.dataInsercao;
    }
    
    public void setDataInsercao(Date dataInsercao) {
        this.dataInsercao = dataInsercao;
    }




}


